package br.com.knowledge.persistence.hibernate.entities;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * BcdColunareferenciaId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class BcdColunareferenciaId implements java.io.Serializable {

	// Fields
	private Integer bcdColunasId;
	private String tipo;

	// Constructors

	/** default constructor */
	public BcdColunareferenciaId() {
	}

	/** full constructor */
	public BcdColunareferenciaId(Integer bcdColunasId, String tipo) {
		this.bcdColunasId = bcdColunasId;
		this.tipo = tipo;
	}

	// Property accessors

	@Column(name = "bcd_colunas_id", nullable = false)
	public Integer getBcdColunasId() {
		return this.bcdColunasId;
	}

	public void setBcdColunasId(Integer bcdColunasId) {
		this.bcdColunasId = bcdColunasId;
	}

	@Column(name = "tipo", nullable = false, length = 1)
	public String getTipo() {
		return this.tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof BcdColunareferenciaId))
			return false;
		BcdColunareferenciaId castOther = (BcdColunareferenciaId) other;

		return ((this.getBcdColunasId() == castOther.getBcdColunasId()) || (this
				.getBcdColunasId() != null
				&& castOther.getBcdColunasId() != null && this
				.getBcdColunasId().equals(castOther.getBcdColunasId())))
				&& ((this.getTipo() == castOther.getTipo()) || (this.getTipo() != null
						&& castOther.getTipo() != null && this.getTipo()
						.equals(castOther.getTipo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getBcdColunasId() == null ? 0 : this.getBcdColunasId()
						.hashCode());
		result = 37 * result
				+ (getTipo() == null ? 0 : this.getTipo().hashCode());
		return result;
	}

}